//package org.activoricordi.app.snippet
package edu.ucdavis.fiehnlab.alchemy.alchemyAdmin.snippet

import xml.NodeSeq

import net.liftweb._
import net.liftweb.mapper._

import  edu.ucdavis.fiehnlab.alchemy.alchemyAdmin.model._

/**
 * Created with IntelliJ IDEA.
 * User: naru
 * Date: 4/1/13
 * Time: 11:34 AM
 * To change this template use File | Settings | File Templates.
 */
object Simple {

  def testView(html:NodeSeq) : NodeSeq = {

    val method:Method = Method.create.name("yaday").description("none").massWindow(4).riWindow(10)
    method.save()

    val compounds:Compound = Compound.create.method(method).inchiKey("asdsadsad").compoundName("dadsad")
      compounds.save()

    val method2:List[Method] = Method.findAll(By(Method.name,"yaday"))

    <xml>nothing to see here, it should work {method.compounds.toList.size} == {method2(0).compounds.toList.size}</xml>
  }
}
